package com.zhuoyue.common.core.domain;


import com.zhuoyue.common.core.domain.model.ServiceCode;

import java.io.Serializable;

/**
 * 服务接口返回 基类
 *
 * @author Administrator
 */
public class ServiceResult implements Serializable {

    /**
     * 返回代码
     */
    private String resultCode = "";

    /**
     * 返回消息
     */
    private String resultMsg = "";

    /**
     * 返回对象
     */
    private Object resultObj = null;

    /**
     *
     */
    public ServiceResult() {
        this.resultCode = ServiceCode.SUCCESS;
    }

    /**
     * @param message
     */
    public ServiceResult(String message) {
        this.resultCode = ServiceCode.SUCCESS;
        this.resultMsg = message;
    }

    /**
     * @param code
     * @param message
     */
    public ServiceResult(String code, String message) {
        this.resultCode = code;
        this.resultMsg = message;
    }

    /**
     * @param code
     * @param message
     * @param ret_obj
     */
    public ServiceResult(String code, String message, Object ret_obj) {
        this.resultCode = code;
        this.resultMsg = message;
        this.resultObj = ret_obj;
    }

    /**
     * @param ret_obj
     */
    public ServiceResult(Object ret_obj) {
        this.resultCode = ServiceCode.SUCCESS;
        this.resultObj = ret_obj;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }

    public Object getResultObj() {
        return resultObj;
    }

    public void setResultObj(Object resultObj) {
        this.resultObj = resultObj;
    }

}
